﻿using System.Data;
using XianShang.Entity;


namespace XianShang.Data
{
    /// <summary>
    /// 数据库操作接口
    /// </summary>
    public interface IDataProvider
    {
        //IDataReader GetTempList();

        #region Admin
        /// <summary>
        /// 檢查用戶名和密碼
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pass"></param>
        /// <returns></returns>
        string CheckUserAndPass(string name, string pass);
        /// <summary>
        /// 取得用戶ID
        /// </summary>
        /// <returns></returns>
        string GetUserAccountId(string name);
        /// <summary>
        /// 根據用戶ID取得用戶名信息
        /// </summary>
        /// <returns></returns>
        DataTable GetUserAccountInfo(string userId);
        /// <summary>
        /// 根據用戶名取得用戶信息
        /// </summary>
        /// <returns></returns>
        DataTable GetUserAccountByUserName(string name);
        /// <summary>
        /// 根據用戶名和密碼取得用戶信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        DataSet GetUserInfoByAccountAndPass(ShortUserInfo user);
        /// <summary>
        /// 取得所有用戶信息
        /// </summary>
        /// <returns></returns>
        DataSet GetAllUserInfo();
        /// <summary>
        /// 增加一個用戶
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        int AddNewUser(ShortUserInfo user);
        /// <summary>
        /// 增加一個超級用戶
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>;
        int AddNewSuperUser(ShortUserInfo user);
        /// <summary>
        /// 取得所有用戶和關聯角色信息
        /// </summary>
        /// <returns></returns>
        DataSet GetAllUserOrRolesInfo();
        /// <summary>
        /// 根據用戶ID刪除用戶
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int DelUser(string userId);
        /// <summary>
        /// 根據用戶ID更新用戶狀態
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int UpDateUserSysStatusById(string userId, string sts);
        /// <summary>
        /// 根據用戶名刪除用戶
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int DelUserByAccount(string account);
        /// <summary>
        /// 根據用戶名刪除用戶包括超級用戶
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int DelUserByAccountAndSuperAccount(string account);
        /// <summary>
        /// 根據用戶ID更新用戶密碼
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        int UpDateUserPasswordById(string userId, string pass);
        #region 角色
        /// <summary>
        /// 根據用戶名和模塊代號取得用戶模塊權限
        /// </summary>
        /// <param name="Account"></param>
        /// <param name="ModuleCode"></param>
        /// <returns></returns>
        DataSet GetModulePermissions(string Account, int ModuleCode);
        /// <summary>
        /// 根據用戶名和模塊名稱取得用戶模塊權限
        /// </summary>
        /// <param name="Account"></param>
        /// <param name="ModuleName"></param>
        /// <returns></returns>
        DataSet GetModulePermissions(string Account, string ModuleName);
        /// <summary>
        /// 根據帳號取得所有模塊角色權限
        /// </summary>
        /// <param name="Account">帳號</param>
        /// <returns></returns>
        DataSet GetAllModulePermissions(string Account);
        /// <summary>
        /// 根據用戶名取得該用戶隸屬角色
        /// </summary>
        /// <param name="Account"></param>
        /// <returns></returns>
        DataSet GetAllUserRoles(string Account);
        /// <summary>
        /// 根據用戶名取得該用戶擁有操作模塊資源
        /// </summary>
        /// <param name="Account"></param>
        /// <returns></returns>
        DataSet GetAllUserModule(string Account);
        /// <summary>
        /// 取得所有模塊資源
        /// </summary>
        /// <returns></returns>
        DataSet GetAllModule();
        /// <summary>
        /// 創建一個新角色
        /// </summary>
        /// <param name="RolesName">角色名</param>
        /// <returns></returns>
        int AddNewRoles(string RolesName);
        /// <summary>
        /// 創建一個新角色并返回角色ID
        /// </summary>
        /// <param name="RolesName">角色名</param>
        /// <returns></returns>
        object AddNewRolesReturnId(string RolesName);
        /// <summary>
        /// 添加（分配）用戶角色
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="RolesId"></param>
        /// <returns></returns>
        int AddNewUserRoles(int UserId, int RolesId);
        /// <summary>
        /// 添加（分配）用戶角色
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="RolesId"></param>
        /// <returns></returns>
        int AddNewUserRoles(string UserId, string RolesId);
        /// <summary>
        /// 根據用戶名取得用戶主鍵ID
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        object GetUserID(string UserName);
        /// <summary>
        /// 根據角色名取得角色主鍵ID
        /// </summary>
        /// <param name="RolesName"></param>
        /// <returns></returns>
        object GetRolesID(string RolesName);
        /// <summary>
        /// 取得角色表所有信息
        /// </summary>
        /// <returns></returns>
        DataSet GetRolesInfo();
        /// <summary>
        /// 取得權限類表全部記錄信息
        /// </summary>
        /// <returns></returns>
        DataSet GetPermissionsInfo();
        /// <summary>
        /// 取得角色模塊資源
        /// </summary>
        /// <param name="rolesid"></param>
        /// <returns></returns>
        DataSet GetRolesModule(string rolesid);
        /// <summary>
        /// 取得所有模塊與角色與權限信息
        /// </summary>
        /// <returns></returns>
        DataSet GetAllRolesModulePermissions();
        /// <summary>
        /// 添加一組操作權限
        /// </summary>
        /// <param name="Read"></param>
        /// <param name="Edit"></param>
        /// <param name="Delete"></param>
        /// <param name="Add"></param>
        /// <returns></returns>
        int AddNewPermissions(PermissionsInfo Per);
        /// <summary>
        /// 添加（分配）角色權限
        /// </summary>
        /// <param name="RolesId"></param>
        /// <param name="PermissionsId"></param>
        /// <returns></returns>
        int AddNewRolesPermissions(int RolesId, int PermissionsId);
        /// <summary>
        /// 根據角色主鍵ID刪除角色
        /// </summary>
        /// <param name="RolesId"></param>
        /// <returns></returns>
        int DeleteRoles(int RolesId);
        /// <summary>
        /// 根據角色名刪除角色
        /// </summary>
        /// <param name="RolesName"></param>
        /// <returns></returns>
        int DeleteRoles(string RolesName);
        /// <summary>
        /// 根據UserRoles主鍵ID刪除用戶角色
        /// </summary>
        /// <param name="UserRolesId"></param>
        /// <returns></returns>
        int DeleteUserRoles(int UserRolesId);
        /// <summary>
        /// 刪除用戶角色
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="RolesId"></param>
        /// <returns></returns>
        int DeleteUserRoles(int UserId, int RolesId);
        /// <summary>
        /// 根據指定用戶ID刪除用戶角色
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="RolesId"></param>
        /// <returns></returns>
        int DeleteUserRoles(string UserId);
        /// <summary>
        /// 根據權限主鍵ID刪除權限組
        /// </summary>
        /// <param name="PermissionsId"></param>
        /// <returns></returns>
        int DeletePermissions(int PermissionsId);
        /// <summary>
        /// 刪除角色權限
        /// </summary>
        /// <param name="RolesId"></param>
        /// <param name="PermissionsId"></param>
        /// <returns></returns>
        int DeleteRolesPermissions(int RolesId, int PermissionsId);
        /// <summary>
        /// 根據RolesPermissions主鍵ID刪除角色權限
        /// </summary>
        /// <param name="RolesPermissionsId"></param>
        /// <returns></returns>
        int DeleteRolesPermissions(int RolesPermissionsId);
        /// <summary>
        /// 根據ROLES表組件ID更改角色名
        /// </summary>
        /// <param name="RolesId"></param>
        /// <param name="RolesName"></param>
        /// <returns></returns>
        int UpdateRolesName(int RolesId, string RolesName);
        /// <summary>
        /// 添加新操作模塊
        /// </summary>
        /// <param name="MInfo"></param>
        /// <returns></returns>
        int AddNewModule(ModuleInfo MInfo);
        /// <summary>
        /// 根據模塊ID更新模塊名
        /// </summary>
        /// <param name="MInfo"></param>
        /// <returns></returns>
        int UpdateModuleName(ModuleInfo MInfo);
        /// <summary>
        /// 根據模塊ID刪除模塊
        /// </summary>
        /// <param name="MInfo"></param>
        /// <returns></returns>
        int DeleteModuleById(ModuleInfo MInfo);
        /// <summary>
        /// 根據模塊名刪除模塊
        /// </summary>
        /// <param name="MInfo"></param>
        /// <returns></returns>
        int DeleteModuleByName(ModuleInfo MInfo);
        /// <summary>
        /// 給角色指定（添加）操作模塊
        /// </summary>
        /// <param name="RMinfo"></param>
        /// <returns></returns>
        int AddNewRolesModule(RolesModuleInfo RMinfo);
        /// <summary>
        /// 根據主鍵ID刪除角色操作模塊
        /// </summary>
        /// <param name="RMinfo"></param>
        /// <returns></returns>
        int DeleteRolesModuleById(RolesModuleInfo RMinfo);
        /// <summary>
        /// 根據角色ID刪除角色操作模塊
        /// </summary>
        /// <param name="RMinfo"></param>
        /// <returns></returns>
        int DeleteRolesModuleByRolesId(RolesModuleInfo RMinfo);
        /// <summary>
        /// 根據模塊ID和角色ID刪除角色操作模塊
        /// </summary>
        /// <param name="RMinfo"></param>
        /// <returns></returns>
        int DeleteRolesModuleByRolesIdAndModuleId(RolesModuleInfo RMinfo);
        /// <summary>
        /// 取得所有角色信息
        /// </summary>
        /// <returns></returns>
        DataSet GetAllRolesInfo();
        /// <summary>
        /// 根據ID刪除角色和所有關聯表數據
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DelRolesAndInnerTable(string id);
        #endregion

        #endregion

        #region ModuleAndMenu
        /// <summary>
        /// 根據PID取得菜單
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        DataSet GetMenuByPId(string pid);
        /// <summary>
        /// 根據全部模塊信息列表
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        DataTable GetAllModuleInfo();
        /// <summary>
        /// 根據用戶ID查找資源模塊
        /// 返回【ACCOUNT】、【MODULENAME】字段
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        DataSet GetModulesByUserId(string userid);

        /// <summary>
        /// 根據模塊ID取得菜單
        /// </summary>
        /// <param name="moduleId"></param>
        /// <returns></returns>
        DataSet GetMenuByModuleId(string moduleId);
        /// <summary>
        /// 根據用戶ID取得菜單信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        DataSet GetAllMenuByUserID(string userId);
        /// <summary>
        /// 根據取得所有菜單信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        DataSet GetAllMenu();
        /// <summary>
        /// 根據ID取得菜單信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataSet GetMenuByMenuId(string id);
        /// <summary>
        /// 添加菜單
        /// </summary>
        /// <param name="mi"></param>
        /// <returns></returns>
        int AddMenu(MenuInfo mi);
        /// <summary>
        /// 根據ID更新MenuName MenuOrder MenuUrl lablename lableurl三個字段
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="order"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        int UpDateMenuMenuNameMenuOrderMenuUrlLableNameLableUrlByMenuId(MenuInfo mi);
        /// <summary>
        /// 根據ID取得模塊信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataSet GetModuleById(string id);
        /// <summary>
        /// 根據ID更新 Name Order字段
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        int UpDateModuleNameOrderById(string id, string name, string order);
        /// <summary>
        /// 刪除菜單
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DelMenu(string id);

        #endregion

        #region 換卡通知
        /// <summary>
        /// 在換卡主表中插入一條新數據并返回自增ID值
        /// </summary>
        /// <param name="csInfo"></param>
        /// <returns></returns>
        long AddNewCardSwap(CardSwapInfo csInfo);
        /// <summary>
        /// 新增一條數據到（换卡子表_卡片訊息）CardInfo
        /// </summary>
        /// <param name="cInfo"></param>
        /// <returns></returns>
        int AddNewCardInfo(CardInfo cInfo);
        /// <summary>
        /// 新增一條數據到（换卡子表_帳號數量）CardAccount
        /// </summary>
        /// <param name="caInfo"></param>
        /// <returns></returns>
        int AddNewCardAccount(CardAccountInfo caInfo);
        /// <summary>
        /// 查詢換卡狀態信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="tel"></param>
        /// <param name="gameAccount"></param>
        /// <param name="cardNum"></param>
        /// <returns></returns>
        DataSet GetSwapCardAndCardAccountAndCardInfo(string name, string tel, string gameAccount, string cardNum);
        /// <summary>
        /// 取得換卡列表
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllSwapCardInfo();
        /// <summary>
        /// 取得換卡列表
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllSwapCardInfo(string area);
        /// <summary>
        /// 根據實體參數進行查詢
        /// </summary>
        /// <param name="fr"></param>
        /// <param name="SearchType">查找方式</param>
        /// <returns></returns>
        IDataReader GetAllSwapCardAndChildTableInfo(FullCardSwapInfo fcs, int SearchType);
         /// <summary>
        /// 根據實體參數和查找方式查找內容
        /// </summary>
        /// <param name="fcs"></param>
        /// <param name="SearchType">查找方式</param>
        /// <returns></returns>
        IDataReader GetAllSwapCardAndChildTableByStatusInfo(FullCardSwapInfo fcs, int SearchType);
        /// <summary>
        /// 更新Message ProcessIp Status ProcessTime四個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpSwapCardMessageProcessIpStatusProcessTime(CardSwapInfo cs);
        /// <summary>
        /// 更新 ProcessIp Status ProcessTime三個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpSwapCardStatusProcessTimeProcessIpById(CardSwapInfo cs);
        /// <summary>
        /// 刪除換卡信息包括子表
        /// </summary>
        /// <param name="swapcardid"></param>
        /// <returns></returns>
        int DelSwapCardAndChildTableBySwapCardId(string swapcardid);
        /// <summary>
        /// 根據ID取得換卡信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataTable GetSwapCardById(string id);
        /// <summary>
        /// 取得換卡主表全部信息
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllMainSwapCardInfo();
        /// <summary>
        /// 根據CARDSWAPID取得卡片信息
        /// </summary>
        /// <param name="swapcardid"></param>
        /// <returns></returns>
        DataTable GetCardInfoBySwapCardId(string swapcardid);
        /// <summary>
        /// 根據CARDSWAPID取得換卡帳號信息
        /// </summary>
        /// <param name="swapcardid"></param>
        /// <returns></returns>
        DataTable GetCardAccountBySwapCardId(string swapcardid);
        /// <summary>
        /// 根據主表ID取得主表和關聯字表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataTable GetCardSwapAndChildById(string id);
        /// <summary>
        /// 根據ID取得換卡主表信息
        /// </summary>
        /// <returns></returns>
        DataTable GetMainSwapCardInfo(string id);
        #endregion

        #region 匯款通知
        /// <summary>
        /// 在匯款主表中插入一條新數據并返回自增ID值
        /// </summary>
        /// <param name="rbInfo"></param>
        /// <returns></returns>
        long AddNewRemitBank(RemitBankInfo rbInfo);
        /// <summary>
        /// 新增一條數據到（匯款子表_帳號數量）CardAccount
        /// </summary>
        /// <param name="caInfo"></param>
        /// <returns></returns>
        int AddNewRemitAccount(RemitAccountInfo raInfo);
        /// <summary>
        /// 查詢匯款狀態信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="tel"></param>
        /// <param name="gameAccount"></param>
        /// <param name="bankNum"></param>
        /// <returns></returns>
        DataSet GetRemitBankAndRemitAccountInfo(string name, string tel, string gameAccount, string bankNum);
        /// <summary>
        /// 根據STATUS和實體參數進行查詢返回總行數
        /// </summary>
        /// <param name="fr"></param>
        /// <param name="SearchType">查找方式（1精確0模糊）</param>
        /// <returns></returns>
        object GetRemitBankAndRemitAccountInfoByStatusCount(FullRemitInfo fr, int SearchType);

        /// <summary>
        /// 根據實體參數進行查詢返回總行數
        /// </summary>
        /// <param name="fr"></param>
        /// <param name="SearchType">查找方式（1精確0模糊）</param>
        /// <returns></returns>
        object GetRemitBankAndRemitAccountInfoCount(FullRemitInfo fr, int SearchType);
        /// <summary>
        /// 取得總匯款信息
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllRemitInfo();
        /// <summary>
        /// 取得匯款類表
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllRemitInfo(string area);
        /// <summary>
        /// 根據實體參數進行查詢
        /// </summary>
        /// <param name="fr"></param>
        /// <param name="SearchType">查找方式（1精確0模糊）</param>
        /// <returns></returns>
        IDataReader GetRemitBankAndRemitAccountInfo(FullRemitInfo fr, int SearchType);

        /// <summary>
        /// 根據STATUS和實體參數進行查詢
        /// </summary>
        /// <param name="fr"></param>
        /// <param name="SearchType">查找方式（1精確0模糊）</param>
        /// <returns></returns>
        IDataReader GetRemitBankAndRemitAccountInfoByStatus(FullRemitInfo fr, int SearchType);
        /// <summary>
        /// 更新匯款開通狀態
        /// </summary>
        /// <param name="remitBankId"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int UpRemitBankStatus(string remitBankId, int status);
        /// <summary>
        /// 根據ID更新狀態和處理信息
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        int UpRemitBankStatusAndMessage(string id, string status, string content);
        /// <summary>
        /// 刪除匯款包括關聯字表記錄
        /// </summary>
        /// <param name="remitId"></param>
        /// <returns></returns>
        int DelRemitBankAndRemitAccount(string remitId);
         /// <summary>
        /// 根據ID查找匯款信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataTable GetRemitInfoById(string id);
        #endregion

        #region 帳號轉移

        /// <summary>
        /// 在換卡主表中插入一條新數據并返回自增ID值
        /// </summary>
        /// <param name="maInfo"></param>
        /// <returns></returns>
        int AddNewMoveAccount(MoveAccountInfo maInfo);
        /// <summary>
        /// 根據指定值查找轉移帳戶信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="tel"></param>
        /// <param name="oldAccount"></param>
        /// <param name="newAccount"></param>
        /// <returns></returns>
        DataSet GetMoveAccount(string name, string tel, string oldAccount, string newAccount);
        /// <summary>
        /// 根據 name,tel,bbsaccount,status,newaccount,oldaccount,time取得信息
        /// </summary>
        /// <param name="ma"></param>
        /// <param name="SearchType">查找方式（1精確0模糊）</param>
        /// <returns></returns>
        IDataReader GetMoveAccountInfo(MoveAccountInfo ma, int SearchType);
         /// <summary>
        /// 取得所有轉移信息
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllMoveAccountInfo();
        /// <summary>
        /// 取得所有轉移信息
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllMoveAccountInfo(string area);
        /// <summary>
        /// 更新Message ProcessIp Status ProcessTime四個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpMoveAccountMessageProcessIpStatusProcessTime(MoveAccountInfo ma);
        /// <summary>
        /// 更新 ProcessIp Status ProcessTime三個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpMoveAccountStatusProcessTimeProcessIpById(MoveAccountInfo ma);
        /// <summary>
        /// 根據ID查找記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataSet GetMoveAccountById(string id);
        /// <summary>
        /// 根據ID刪除記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DelMoveAccountById(string id);
        #endregion

        #region IBonPay匯款
        /// <summary>
        /// 在IBONPAY主表中插入一條新數據并返回自增ID值
        /// </summary>
        /// <param name="rbInfo"></param>
        /// <returns></returns>
        long AddNewIBonPay(IBonPayInfo ibonInfo);
        /// <summary>
        /// 新增一條數據到（IBONPAY子表_帳號數量）CardAccount
        /// </summary>
        /// <param name="caInfo"></param>
        /// <returns></returns>
        int AddNewIBonPayAccount(IBonPayAccountInfo ibonInfo);
        /// <summary>
        /// 根據訂單號更新支付狀態
        /// </summary>
        /// <param name="ibonInfo"></param>
        /// <returns></returns>
        int UpDateIBonPayPayNumAndPayStatus(IBonPayInfo ibonInfo);
        /// <summary>
        /// 取得所有內容
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllIBonPayAndChildTableInfo();
        /// <summary>
        /// 取得所有內容
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllIBonPayAndChildTableInfo(string area);
        /// <summary>
        /// 根據相關條件查找IBONPAY繳費信息
        /// </summary>
        /// <param name="name"></param>
        /// <param name="tel"></param>
        /// <param name="gameAccount"></param>
        /// <param name="payOrder"></param>
        /// <returns></returns>
        DataSet GetIBonPayAndIBonPayAccountInfo(string name, string tel, string gameAccount, string payOrder);
        /// <summary>
        /// 根據實體參數和查找方式查找內容
        /// </summary>
        /// <param name="fcs"></param>
        /// <param name="SearchType">查找方式</param>
        /// <returns></returns>
        IDataReader GetIBonPayAndChildTableInfo(FullIBonPayInfo fip, int SearchType);
        /// <summary>
        /// 更新Message ProcessIp Status ProcessTime四個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpIBonPayMessageProcessIpStatusProcessTime(FullIBonPayInfo fip);
        /// <summary>
        /// 更新 ProcessIp Status ProcessTime三個字段
        /// </summary>
        /// <param name="cs"></param>
        /// <returns></returns>
        int UpIBonPayStatusProcessTimeProcessIpById(FullIBonPayInfo fip);
        /// <summary>
        /// 根據ID查找記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataTable GetIBonPayById(string id);
        /// <summary>
        /// 根據ID刪除記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DelIBonPayById(string id);

        /// <summary>
        /// 根據ID刪除記錄
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DelIBonPayAccountByIBonPayId(string id);
        #endregion


        #region 新聞 -吳

        /// <summary>
        /// 獲取信息顯示新聞列表
        /// </summary>
        /// <returns></returns>
        IDataReader GetNewsInfo();

        /// <summary>
        /// 獲取一條要修改的新聞信息顯示
        /// </summary>
        /// <param name="NewId"></param>
        /// <returns></returns>
        NewsInfo GetNewsId(string NewId);

        /// <summary>
        /// 增加一條新聞信息(來源為空時)
        /// </summary>
        /// <param name="Ninfo"></param>
        /// <returns></returns>
        int AddNewsInfo(NewsInfo Ninfo);

        /// <summary>
        /// 增加一條新聞信息(來源不為空時)
        /// </summary>
        /// <param name="Ninfo"></param>
        /// <returns></returns>
        int AddNewsInfo1(NewsInfo Ninfo);

        /// <summary>
        /// 修改一條新聞信息(來源為空時)
        /// </summary>
        /// <param name="Ninfo"></param>
        /// <returns></returns>
        int UpNewsInfo(string NewsTitle, string NewsContent, string NewsTimes, string Id);

        /// <summary>
        /// 修改一條新聞信息(來源不為空時)
        /// </summary>
        /// <param name="Ninfo"></param>
        /// <returns></returns>
        int UpNewsInfo1(string NewsTitle, string NewsContent, string NewsFrom, string NewsTimes, string Id);

        /// <summary>
        /// 根據新聞ID刪除新聞信息
        /// </summary>
        /// <param name="NewId"></param>
        /// <returns></returns>
        int DelNewsInfo(string NewId);

         /// <summary>
        /// 更新新聞點擊量
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int UpNewsHits(string id);

        #endregion

        #region 後臺程序管理 -吳
        /// <summary>
        /// 取得下載類表前35條記錄
        /// </summary>
        /// <returns></returns>
        DataSet GetSoftWareProcAndVerTop35Rows();
        /// <summary>
        /// 獲取信息顯示程序版本類別列表
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        DataSet GetVersionInfo();
        /// <summary>
        /// 根據下載主表ID取得下載類表
        /// </summary>
        /// <returns></returns>
        DataSet GetSoftWareProcAndVerById(string id);
        /// <summary>
        /// 獲取信息綁定程序版本類別
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        DataSet BindVersionInfo();

        /// <summary>
        /// 獲取信息顯示程序下載列表
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        DataSet GetProcedInfo();

        /// <summary>
        /// 根據類別id顯示相應的類別名稱
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        SoftwareVerInfo GetVersionName(string Id);

        /// <summary>
        /// 獲取一條要修改的程序下載信息顯示
        /// </summary>
        /// <param name="ProcId"></param>
        /// <returns></returns>
        SoftwareDownInfo GetProcedId(string ProcId);

        /// <summary>
        /// 增加一條程序版本類別信息
        /// </summary>
        /// <param name="Verinfo"></param>
        /// <returns></returns>
        int AddVersionInfo(SoftwareVerInfo Verinfo);

        /// <summary>
        /// 增加一條程序下載信息（語言不為空時）
        /// </summary>
        /// <param name="Procfo"></param>
        /// <returns></returns>
        int AddProcedInfo(SoftwareDownInfo Procfo);

        /// <summary>
        /// 增加一條程序下載信息（語言為空時）
        /// </summary>
        /// <param name="Procfo"></param>
        /// <returns></returns>
        int AddProcedInfo1(SoftwareDownInfo Procfo);

        /// <summary>
        /// 更新一條程序版本類別信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpVersionInfo(string FileName, string Xuhao, bool Show, string Id);

        /// <summary>
        /// 更新一條要修改的程序下载信息(语言为空)
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpProcedInfo(int VerType, string Version, string Md5, string Conent, string DownUrl1, string DownUrl2, string Time, bool IsDown, string Id);

        /// <summary>
        /// 更新一條要修改的程序下载信息(语言不为空)
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpProcedInfo1(int VerType, string Language, string Version, string Md5, string Conent, string DownUrl1, string DownUrl2, string Time, bool IsDown, string Id);

        /// <summary>
        /// 更新設置是否提供程序下載
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpIsProc(bool IsDown, string Id);

        /// <summary>
        /// 根據程序版本類別ID刪除版本信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        int DelVersionInfo(string Id);

        /// <summary>
        /// 根據程序版本類別ID刪除程序信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        int DelProcedInfo(string Id);

        /// <summary>
        /// 根據下載id刪除程序下載信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        int DelProcedId(string Id);

        #endregion

        #region 後臺使用说明管理 -吳
        /// <summary>
        /// 獲取信息顯示使用说明列表
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        DataSet GetHelpInfo();

        /// <summary>
        /// 獲取一條要修改的使用说明信息顯示
        /// </summary>
        /// <param name="ProcId"></param>
        /// <returns></returns>
        HelpInfo GetHelpId(string HId);

        /// <summary>
        /// 增加一條使用说明信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        int AddHtmlHelpInfo(HelpInfo Hinfo);
        /// <summary>
        /// 增加一條使用说明信息
        /// </summary>
        /// <param name="Verinfo"></param>
        /// <returns></returns>
        int AddHelpInfo(HelpInfo Hinfo);

        /// <summary>
        /// 更新一條要修改的使用说明信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpHelpByHtmlInfo(HelpInfo hInfo);
        /// <summary>
        /// 更新一條要修改的使用说明信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        int UpHelpInfo(string Title, string Content, string Id);


        /// <summary>
        /// 根據使用说明ID刪除使用说明信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        int DelHelpInfo(string Id);


        #endregion

        #region 後臺留言管理 -吳
        /// <summary>
        /// 獲取信息顯示留言信息列表
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        IDataReader GetMsgInfo();
        /// <summary>
        /// 獲取留言信息的總數 條件show=true
        /// </summary>
        /// <returns></returns>
        int GetMsgNum();
        /// <summary>
        /// 獲取信息顯示留言信息列表
        /// </summary>
        /// <returns></returns>
        IDataReader GetAllMsgInfo();
         /// <summary>
        /// 根據更新一條留言信息
        /// </summary>
        /// <returns></returns>
        int UpMsgInfoById(LeaveMsgInfo msg);


        /// <summary>
        /// 根據留言ID刪除留言信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        int DelMsgInfo(string Id);

        /// <summary>
        /// 插入一條新紀錄
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        int AddMsgInfo(LeaveMsgInfo msg);
        /// <summary>
        /// 根據ID取得留言信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        DataTable GetMsgInfoById(string id);

        /// <summary>
        /// 根據ID修改 recontent retime show 
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        int UpDateReContentAndReTimeAndShowById(LeaveMsgInfo msg);
        /// <summary>
        /// 根據id修改Show
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        int UpDateShowById(LeaveMsgInfo msg);
        #endregion

        #region 公告
        /// <summary>
        /// 增加一條信息（來源為空時）
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        int AddNoticeInfo(NoticeInfo Ninfo);



        /// <summary>
        /// 修改一條公告信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        int UpNoticeInfo(NoticeInfo Ninfo);

        /// <summary>
        /// 獲取信息顯示公告列表
        /// </summary>
        /// <returns></returns>
        IDataReader GetNoticeInfo();
        /// <summary>
        /// 獲取信息顯示公告列表
        /// </summary>
        /// <param name="isShow">顯示狀態（1顯示0不顯示）</param>
        /// <returns></returns>
        IDataReader GetNoticeInfo(int isShow);

        /// <summary>
        /// 獲取一條要修改的公告信息顯示
        /// </summary>
        /// <returns></returns>
        DataSet GetNoticeId(string Id);

        /// <summary>
        /// 根據ID刪除公告信息
        /// </summary>
        /// <returns></returns>
        int DelNoticeInfo(string Id);
        #endregion

        #region 水晶報表
        /// <summary>
        /// 取得最近30天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneMonth_Remit(string area);
        /// <summary>
        ///  取得最近7天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeek_Remit(string area);

        /// <summary>
        ///  取得某一天成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneDay_Remit(string area, System.DateTime dt);
        /// <summary>
        /// 取得最近30天匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneMonthNum_Remit(string area);
        /// <summary>
        ///  取得最近7天匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeekNum_Remit(string area);

        /// <summary>
        ///  取得某一天成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneDayNum_Remit(string area, System.DateTime dt);
         /// <summary>
        /// 取得某個月匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonth_Remit(string area, string year, string month);
        /// <summary>
        /// 某個月匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonthNum_Remit(string area, string year, string month);

         /// <summary>
        /// 取得最近7天成交記錄點數
        /// </summary>
        /// <param name="area"></param>
        /// <returns></returns>
         DataSet GetNearOneWeekCardPoint_SwapCard(string area);

   /// <summary>
        /// 某個月匯款成交點數
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonthCardPoint_SwapCard(string area, string year, string month);

        /// <summary>
        /// 進一個月交易點數
        /// </summary>
        /// <param name="area"></param>
        /// <returns></returns>
        DataSet GetNearOneMonthCardPoint_SwapCard(string area);

/// <summary>
        ///  取得某一天成交記錄點數
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetOneDayNumCardPoint_SwapCard(string area, System.DateTime dt);
        /// <summary>
        ///  取得某一天成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetOneDayNum_SwapCard(string area, System.DateTime dt);
        // <summary>
        /// 進一個月交易數量
        /// </summary>
        /// <param name="area"></param>
        /// <returns></returns>
        DataSet GetNearOneMonthNum_SwapCard(string area);
        /// <summary>
        /// 某個月匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonthNum_SwapCard(string area, string year, string month);
        /// <summary>
        ///  取得最近7天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeekNum_SwapCard(string area);


        /// <summary>
        ///  取得某一天成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetOneDayNum_MoveAccount(string area, System.DateTime dt);
        /// <summary>
        /// 進一個月交易數量
        /// </summary>
        /// <param name="area"></param>
        /// <returns></returns>
        DataSet GetNearOneMonthNum_MoveAccount(string area);
        /// <summary>
        /// 某個月匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonthNum_MoveAccount(string area, string year, string month);
        /// <summary>
        ///  取得最近7天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeekNum_MoveAccount(string area);

        #region IBON匯款

        /// <summary>
        /// 取得最近30天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneMonth_Ibon(string area);
        DataSet GetNearOneMonthNum_Ibon(string area);
        /// <summary>
        ///  取得最近7天匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeek_Ibon(string area);

        /// <summary>
        ///  取得最近7天匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneWeekNum_Ibon(string area);

        /// <summary>
        ///  取得某一天成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneDayNum_Ibon(string area, System.DateTime dt);
        /// <summary>
        ///  取得某一天成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetNearOneDay_Ibon(string area, System.DateTime dt);

        /// <summary>
        /// 取得某個月匯款成交記錄
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonth_Ibon(string area, string year, string month);
        /// <summary>
        /// 某個月匯款成交數量
        /// </summary>
        /// <param name="area">地區如果為0則代表全部地區</param>
        /// <returns></returns>
        DataSet GetYearMonthNum_Ibon(string area, string year, string month);
        #endregion

        #endregion



    }
} 
